package com.java.blog.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.java.blog.entity.response.ResponseJson;
import com.java.blog.service.CrawlService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@Api("爬虫")
@RequestMapping("/crawl")
@Controller
public class CrawlController {
	@Autowired
	private CrawlService crawlService;

	/**
	 * @Describe:跳转到首页
	 */
	@ApiOperation("从redis获取爬到的糗事")
	@RequestMapping(value = "/qiushi", method = RequestMethod.GET)
	public ResponseJson qiushi() {
		return null;
	}

	/**
	 * @Describe:跳转到首页
	 */
	@ApiOperation("手动开启爬虫糗事")
	@RequestMapping(value = "/startQiushi", method = RequestMethod.GET)
	public void startQiushi() {
		crawlService.startQiushi();
	}

}
